Question: "How did you program your robot to move in a perfect triangle?" Arianna asks, sounding impressed. "It always comes back to exactly where it started!" "My code uses the law of cosines and the law of sines." Raphael proudly replies. "For example, if it moves $3\text{ m}$, turns $120^\circ$, then moves $4\text{ m}$ more, it can compute the distance back to where it started as well as the angle it must turn." In Raphael's example, what distance would his robot compute? Do not round during your calculations. Round your final answer to the nearest hundredth of a meter.
Explanation: Converting the problem into geometrical terms Our problem can be modeled by the following triangle $\triangle ABC$, where we want to find $AC=d$. Furthermore, angle $\angle B$ is supplementary to $120^\circ$, so its measure is $60^\circ$. $60^\circ$ $d$ $A$ $B$ $C$ $120^\circ$ $3\,\text{m}$ $4\,\text{m}$ Since we are given two side lengths and the angle measure between them, we can use the law of cosines. Using the law of cosines $\begin{aligned} (AC)^2&=(AB)^2+(BC)^2-2AB\!\cdot\! BC\!\cdot\!\cos(B)\\\\ d^2&=3^2+4^2-2\cdot 3\cdot 4\cdot\cos(60^\circ) \gray{\text{Substitute}}\\\\ d&=\sqrt{3^2+4^2-2\cdot 3\cdot 4\cdot\cos(60^\circ)}\\\\ d&\approx 3.61 \end{aligned}$ The answer In Raphael's example, his robot would compute a distance of $3.61$ meters.